from core.basehandler import BaseHandler
from core.room import Room
from core.action import Action

class PrisonWall(Room):
    def __init__(self, room_id):
        Room.__init__(self, room_id)
        
        self.add_action(StepBack)
        #self.add_action(Inhale)
    
    # return description of room.
    def get_description(self):
        return "You examine the wall, notice it is covered with an oddly colored dirt substance with a pungent odor."
    
    # return image of room
    def get_image(self):
        return 'prisonwall.jpg'


class PrisonWallHandler(BaseHandler):
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return PrisonWall

class StepBack(Action):
    def __init__(self):
        Action.__init__(self, "StepBack")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "StepBack"
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'prisonhall'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"